﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace Small.Html.UI
{
    public static class HtmlCondictionBegin
    {

        public static MvcHtmlString CondictionBegin(this HtmlHelper helper, string id, object htmlAttributes = null)
        {
            var attributes = BaseHelper.GetHtmlAttributes(htmlAttributes);
            StringBuilder builder = new StringBuilder();
            builder.Append("<div  class=\"small_predicate_container\" id=\""+id+"\"" );

            if (attributes != null)
            {
                foreach (var item in attributes)
                {
                    builder.Append(item.Name + "=\"" + item.Value + "\" ");
                }
            }
            builder.Append(">");
            builder.Append("<div class=\"small_predicate_left\"></div> ");
            builder.Append("<div class=\"small_predicate_center\">");
            return new MvcHtmlString(builder.ToString());
        }
    }
}
